package com.itheima;

import com.itheima.domain.Goods;
import com.itheima.domain.Order;
import com.itheima.domain.User;
import com.itheima.service.OrderService;
import com.itheima.service.impl.GoodsServiceImpl;
import com.itheima.service.impl.OrderServiceImpl;
import com.itheima.service.impl.UserServiceImpl;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import java.util.List;

public class App {
    public static void main(String[] args) {
        //TODO:加载Spring容器,从容器中获取OrderService对象完成根据订单ID查询订单信息并把结果打印到控制台
        ApplicationContext ctx=new ClassPathXmlApplicationContext("applicationContext.xml");
        OrderService os = ctx.getBean(OrderService.class);
        Order order = os.findById(1);
        System.out.println(order);
    }
}